<template>
  <div id='app'>
    <treeselect v-model='value' :multiple='true' :limit-text="limitTextFun" :options='options' :show-count='true' :limit='1' style='width:220px' />
  </div>
</template>

<script>

import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'

export default {
  name: 'vTreeSelect',
  components: { Treeselect },
  data() {
    return {
      value: null,
      options: [{
        id: 'a',
        label: 'a',
        children: [{
          id: 'aa',
          label: 'aa'
        }, {
          id: 'ab',
          label: 'ab'
        }]
      }, {
        id: 'b',
        label: 'b'
      }, {
        id: 'c',
        label: 'c'
      }]
    }

  },
  methods:{
    limitTextFun(count) {
      return `+${count}`
    },
  }
}
</script>
